package as.interceptor;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public class AuthenicInterceptor extends AbstractInterceptor {
    
	@Override
	public String intercept(ActionInvocation action) throws Exception {

		/*String user = (String) action.getInvocationContext().getSession()
				.get("user");

		if (user == null) {
			HttpServletRequest request = ServletActionContext.getRequest();
			StringBuffer url=request.getRequestURL();
			request.setAttribute("url", url.toString());
			return Action.LOGIN;

		}*/
		return action.invoke();
	}

}
